//
//  EQHUD.swift
//  EQQuestionBank
//
//  Created by 范伟健 on 2018/8/6.
//  Copyright © 2018年 FanWeiJian. All rights reserved.
//

import Foundation
import SwiftProgressHUD

class EQHUD {
    static func showSuccess(_ text: String){
        SwiftProgressHUD.showSuccess(text)
        EQHUD.hidHUD(1.5)
    }
    
    static func showWait(){
        SwiftProgressHUD.showWait()
    }
    
    static func showFail(_ text: String){
        SwiftProgressHUD.showFail(text)
        hidHUD(1.5)
    }
    
    static func showInfo(_ text: String) {
        SwiftProgressHUD.showInfo(text, autoClear: true, autoClearTime: 2)
    }
    
    static func hidHUD(_ time: TimeInterval){
        DispatchQueue.main.asyncAfter(deadline: .now() + time) {
            SwiftProgressHUD.hideAllHUD()
        }
    }
    
    static func hidHUD(){
        SwiftProgressHUD.hideAllHUD()
    }
    
}
